<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!--edge浏览器H5兼容设置-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--360浏览器H5兼容设置-->
    <meta name="renderer" content="webkit" />
    <title>跨境电商借卖平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--导入核心文件-->
    <script src="../static/bootstrap3/js/holder.js"></script>
    <link href="../static/bootstrap3/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="../static/bootstrap3/jquery-1.9.1.min.js"></script>
    <script src="../static/bootstrap3/js/bootstrap.js"></script>
    <!-- 字体图标 -->
    <link rel="stylesheet" href="../static/bootstrap3/font-awesome-4.7.0/css/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/layout.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/top.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/footer.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/order.css" />
</head>

<body>

<header class="header">


</header>
<!--导航 -->
<!--分割导航和顶部-->
<div class="row top-nav">
    <div class="col-md-6">
        <form th:action="@{'findBytitleOndfh'}" class="form-inline pull-right" role="form" method="post">
            <div class="form-group">
                <input type="text" class="form-control" id="search" name="search" placeholder="请输入商品名称进行搜索">
            </div>
            <button type="submit" class="btn btn-default btn-sm"><span class="fa fa-search"></span></button>
        </form>
    </div>
</div>
<!--头部结束-->
<!--导航结束-->
<div class="container">
    <div class="col-md-2">
        <!--左侧导航开始-->
        <div class="panel-group" id="accordion">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <!--主选项：品牌商订单管理-->
                    <p class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">品牌商订单管理</a>
                    </p>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div><a href="findAll"><b>所有订单</b></a></div>
                        <div><a href="findAllBydzf"><b>待支付订单</b></a></div>
                        <div><a href="findAllBydfh"><b>待发货订单</b></a></div>
                        <div><a href="findAllByyfh"><b>已发货订单</b></a></div>
                        <div><a href="findAllByywc"><b>已完成订单</b></a></div>
                        <div><a href="findAllByyqx"><b>已取消订单</b></a></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--左侧导航结束-->
    <div class="col-md-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <p class="panel-title">待发货订单
                </p>
            </div>
            <div class="panel-body">
                <table class="orders-table" width="100%">
                    <thead>
                    <tr>
                        <th width="15%"></th>
                        <th width="15%">商品</th>
                        <th width="8%">价格</th>
                        <th width="8%">数量</th>
                        <th width="15%">订单编号</th>
                        <th width="10%">创建时间</th>
                        <th width="20%">操作</th>
                    </tr>
                    </thead>
                    <tbody class="orders-body">
                    <tr th:each="order:${pageInfo.list}">
                        <td><img th:src="@{'../static/img/'+${order.image}}"
                                 class="img-responsive"/></td>
                        <td>
                            <a th:text="${order.ctitle}" th:href="@{'goods'}"></a>
                        </td>
                        <td th:text="${order.cprice}"></td>
                        <td th:text="${order.cnumb}"></td>
                        <td th:text="${order.corder}"></td>
                        <td th:text="${#dates.format(order.cdate,'yyyy-MM-dd HH:mm:sss')}"></td>
                        <td colspan="2">
                            <a th:text="发货" th:href="@{'send/'+${order.id}}" class="btn btn-default btn-xs"></a>

                            <!-- 按钮触发模态框 -->
                            <button class="btn btn-sm btn-lg" data-toggle="modal" data-target="#myModal">输入物流单号</button>
                            <!-- 模态框（Modal） -->
                            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                            <h4 class="modal-title" id="myModalLabel">输入物流单号</h4>
                                        </div>
                                        <form id="formData"  th:action="@{'track/'+${order.id}}" class="form-horizontal" method="post" >
                                            <div class="modal-body">
                                                <div class="form-group">
                                                    <label class="control-label col-lg-2">物流单号:</label>
                                                    <div class="col-lg-9">
                                                        <input type="text" value="" id="tracknumb" name="tracknumb" placeholder="tracknumb" class="form-control"></br>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                <button type="submit" class="btn btn-primary">提交</button>
                                            </div>
                                        </form>
                                    </div><!-- /.modal-content -->
                                </div><!-- /.modal-dialog -->
                            </div>
                            <!-- /.modal -->
                            <script>
                                $(function() {
                                    $('#myModal').modal('hide')
                                });
                            </script>
                            <script>
                                $(function() {
                                    $('#myModal').on('hide.bs.modal',
                                        function() {
                                            alert('无物流单号，发货失败');
                                        })
                                });
                            </script>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <div class="pager" style="margin-right:700px;cursor:pointer;">
                    <ul class="pagination">
                        <li class="page-item" th:if="${pageInfo.pageNum!=1}">
                            <a class="page-link" th:href="@{/gysOrder/findAll(pageNum=1)}">首页</a>
                        </li>
                        <li class="page-item" th:if="${pageInfo.pageNum!=1}">
                            <a class="page-link" th:href="@{/gysOrder/findAll(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:${pageInfo.pages})}">上一页</a>
                        </li>
                        <li class="page-item"><a class="page-link"><span th:text="第+${pageInfo.pageNum}+页"></span></a></li>
                        <li class="page-item"><a class="page-link"><span th:text="共+${pageInfo.pages}+页"></span></a></li>
                        <li class="page-item" th:if="${pageInfo.pageNum != pageInfo.pages}">
                            <a class="page-link" th:href="@{/gysOrder/findAll(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
                        </li>
                        <li class="page-item" th:if="${pageInfo.pageNum != pageInfo.pages}">
                            <a class="page-link" th:href="@{/gysOrder/findAll(pageNum=${pageInfo.pages})}">尾页</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

</html>